home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / bsd / sparc / machparam.h < prev    next >
Text File  |  1995-02-14  |  1KB  |  57 lines

  1. /* 
  2.  * Copyright (c) 1994 NeXT, Inc. All rights reserved.
  3.  *
  4.  * HISTORY
  5.  *
  6.  * 21-Apr-1994 Mac Gillon at NeXT
  7.  *    Created from i386 version.
  8.  */ 
  9.  
  10. #ifndef    _SPARC_MACHPARAM_
  11. #define    _SPARC_MACHPARAM_
  12.  
  13. #import <mach/vm_param.h>
  14.  
  15. /*
  16.  * Machine dependent 'constants'.
  17.  */
  18. #define    NBPG    PAGE_SIZE    /* bytes/page */
  19. #define    PGOFSET    (NBPG-1)    /* byte offset into page */
  20. #define    PGSHIFT    PAGE_SHIFT    /* LOG2(NBPG) */
  21.  
  22. #define    CLSIZE            1
  23. #define    CLSIZELOG2        0
  24.  
  25. #define STACKSIZE 4            /* pages in kernel stack */
  26. #define    UPAGES    (USIZE+STACKSIZE)    /* total pages in u-area */
  27.                     /* red zone is beyond this */
  28.  
  29. /*
  30.  * Some macros for units conversion
  31.  */
  32. /* Core clicks (NeXT_page_size bytes) to segments and vice versa */
  33. #define    ctos(x)    (x)
  34. #define    stoc(x)    (x)
  35.  
  36. /* clicks to bytes */
  37. #define    ctob(x)    ((x) << PGSHIFT)
  38.  
  39. /* bytes to clicks */
  40. #define    btoc(x)    ((((unsigned)(x)+PGOFSET) >> PGSHIFT))
  41.  
  42.  
  43. #if    defined(KERNEL) || defined(STANDALONE)
  44. #define    DELAY(n) us_spin(n)
  45.  
  46. #else    defined(KERNEL) || defined(STANDALONE)
  47. #define    DELAY(n)    { register int N = (n); while (--N > 0); }
  48. #endif    defined(KERNEL) || defined(STANDALONE)
  49.  
  50. /*
  51.  * The following symbols are required for the Sun4m architecture.
  52.  *    OPENPROMS    # Open Boot Prom interface
  53.  */
  54. #define    OPENPROMS
  55.  
  56. #endif    _SPARC_MACHPARAM_
  57.